import type { App, Component } from 'vue'
import { SvgIcon } from './svg-icon'
// import { ViewExcel } from './view-excel';
export * from './svg-icon'

const components: Record<string, Component> = {
  SvgIcon,
  // ViewExcel
}

/**
 * 批量注册
 * 重名可能会与components文件夹内的组件冲突
 * components文件夹组件使用自动导入插件导入
 */
export default {
  install: (app: App<Element>) => {
    Object.keys(components).forEach(key =>
      app.component(key, components[key]!),
    )
  },
}
